package com.smartscreen.homeschoolconnection.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class ConversationInfo {
    private String conversationId;
    private OtherPartyInfo otherParty;
    private LastMessageInfo lastMessage;
    private Integer unreadCount;
    
    @Data
    public static class OtherPartyInfo {
        private String userId;
        private String name;
        private String avatarUrl;
    }
    
    @Data
    public static class LastMessageInfo {
        private String content;
        
        @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
        private LocalDateTime sentAt;
    }
}